<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/resource/bootstrap.min.css" >
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/jquery-3.2.1.js" ></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/bootstrap.min.js" ></script>
</head>
<body>
<form action="findList" method="post" id="myForm">
	年龄:<input type="text" name="age1"  > 到<input type="text" name="age2"  > 
	姓名:<input type="text" name="name" > 
	岗位或部门:<input type="text" name="postOrDepart"  > 
	入职天数:<input type="text" name="dayNum1"  > 到<input type="text" name="dayNum2"  > <br>
	
	排序:<input type="checkbox" name="paixu" value="gender" >性别
	<input type="checkbox" name="paixu" value="age" >年龄
	<input type="checkbox" name="paixu" value="salart" >薪资
	<input type="checkbox" name="paixu" value="dayNum" >入职时长
	<input type="checkbox" name="paixu" value="len" >身高
	<input type="hidden" name="paixu" >
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	排序方式:<input type="radio" name="paiType" value="asc" >升序
		<input type="radio" name="paiType" value="desc" >降序
	
	<input type="button" onclick="tj()"  value="查询" >
	<button type="submit">提交</button>
	
</form>
<table class="table" >
	<tr>
		<td>id</td>
		<td>姓名</td>
		<td>性别</td>
		<td>出生日期</td>
		<td>入职日期</td>
		<td>岗位</td>
		<td>部门</td>
		<td>薪资</td>
		<td>身高</td>
		<td>年龄</td>
		<td>入职天数</td>
		<td>工龄</td>
		
	</tr>
	<c:forEach items="${info.list }" var="e">
		<tr>
			
			<td>${e.id }</td>
			<td>${e.name }</td>
			<td>
				<c:if test="${e.gender==1 }">男</c:if>
				<c:if test="${e.gender==2 }">女</c:if>
			</td>
			<td>${e.birthday }</td>
			<td><button>详情</button> </td>
		</tr>
		<tr>
			<td colspan="5">
				<div id="detail${e.id}">
				</div>
			</td>
		</tr>
	</c:forEach>
</table>

<script type="text/javascript">

	function tj(){
		var paixu = new Array();
		$("[name=paixu]:checked").each(function(){
			paixu.push($(this).val())
		})
		alert(paixu);
		$.post("findList",{paixu:paixu},function(){
			
		},"json")
		
	}
</script>
</body>
</html>